<template>
    <el-dialog
            :visible.sync="tileServiceDialogVisible"
            title="编辑数据信息并发布"
            :close-on-click-modal="false"
            v-dialogDrag>
        <el-form :rules="rules" ref="Form" :model="Form">
            <el-form-item label="用户名" prop="name">
                <el-input v-model="Form.name" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="输入文件" prop="filePath">
                <el-input v-model="Form.filePath" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="输入文件类型" prop="fileType">
                <el-select v-model="Form.fileType" placeholder="请选择">
                    <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="图层名" prop="layerName">
                <el-input v-model="Form.layerName" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="输出路径" prop="filePath">
                <el-input v-model="Form.outPath" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="字段选择" >
                <el-table
                        ref="fieldTable"
                        :data="fieldData"
                        tooltip-effect="dark"
                        style="width: 100%"
                        @selection-change="handleSelectionChange">
                    <el-table-column
                            type="selection"
                            width="55">
                    </el-table-column>
                    <el-table-column
                            label="field"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="fieldType"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="valueType"
                            width="120">
                        <el-radio v-model="scope.row.fieldValueType" label="continuous">连续值</el-radio>
                        <el-radio v-model="scope.row.fieldValueType" label="discrete">离散值</el-radio>
                    </el-table-column>
                </el-table>
            </el-form-item>
        </el-form>
        <div style="margin-top: 20px;text-align: center">
            <el-button type="primary" @click="submit">确定</el-button>
            <el-button @click="newFolderDialogVisible=false">取消</el-button>
        </div>
    </el-dialog>
</template>

<script>
    import axios from 'axios';

    export default {
        name: "tileServiceDialog",
        data() {
            return {
                Form: {
                    layerName: '',
                },
                tileServiceDialogVisible: false,
                rules: {},
                options: [{
                    value: 'wkt',
                    label: 'wkt'
                }, {
                    value: 'shp',
                    label: 'shp'
                }],
            }
        },
        methods: {},
        created() {
            let that = this;
            this.$Bus.$on("tileServiceDialogVisible", res => {
                that.tileServiceDialogVisible = res.visible;
            })
        },
    }
</script>

<style scoped>

</style>